//
//  YTVideoSetViewController.m
//  YUNT
//
//  Created by 小萌 on 2017/11/13.
//  Copyright © 2017年 梁炜东. All rights reserved.
//

#import "YTVideoSetViewController.h"
@interface YTVideoSetViewController ()

@end

@implementation YTVideoSetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"视频分辨率";
    // Do any additional setup after loading the view.
    [self loadData];

}
- (void)loadData
{
    YTSetModel *model1 = [[YTSetModel alloc] init];
    model1.name = @"1080P";
    model1.logo = @"36";
    model1.isSelected = publicModel.resolution == 0?YES:NO;
    YTSetModel *model2 = [[YTSetModel alloc] init];
    model2.name = @"720P";
    model2.logo = @"37";
    model2.isSelected = publicModel.resolution == 1?YES:NO;
    YTSetModel *model3 = [[YTSetModel alloc] init];
    model3.name = @"480P";
    model3.logo = @"38";
    model3.isSelected = publicModel.resolution == 2?YES:NO;
    self.dataArr = @[model1,model2,model3];
    [self.tableView reloadData];
}
-(void)tableView:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath
{
    [super tableView:tableView atIndexPath:indexPath];
    [deviceManager setVideoResolution:indexPath.row];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
